import React from 'react'
import LinkA from '@/components/publics/LinkA.jsx'
export default (self) => {
  return [
    {
      title: '用户名',
      key: 'username',
      dataIndex: 'username',
    },
    {
      title: '邮箱',
      key: 'email',
      dataIndex: 'email',
    },
    {
      title: '电话',
      key: 'phone',
      dataIndex: 'phone',
    },
    {
      title: '注册时间',
      key: 'create_time',
      dataIndex: 'create_time',
    },
    {
      title: '所属角色',
      key: 'role_id',
      dataIndex: 'role_id',
      render: (value) => {
        return <span>超级管理员</span>
      },
    },
    {
      title: '操作',
      key: '_id',
      dataIndex: '_id',
      render: (value, record) => {
        return (
          <span>
            <LinkA onClickLink={() => self.toEdit(record)}>修改</LinkA>
            <LinkA onClickLink={() => self.toDelete(value)}>删除</LinkA>
          </span>
        )
      },
    },
  ]
}
